<?php

namespace Xin\Hyperf\Fortify\Server;

use Hyperf\Server\ServerFactory as HyperfServerFactory;
use Xin\Support\Arr;
use Xin\Support\Reflect;

class ServerFactory extends HyperfServerFactory
{
    public function start(): void
    {
        $isEnable = Arr::get(Reflect::getPropertyValue($this->config, 'config'), 'enable');
        if ($isEnable === false) {
            return;
        } else {
            parent::start();
        }
    }
}
